package controller;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import beans.UserPwdFormBean;

public class leseServlet extends HttpServlet{

	public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setContentType("text/html");
       
        HttpSession s = request.getSession(true);
        
		UserPwdFormBean upfb = new UserPwdFormBean();
		upfb.setUsername(request.getParameter("username"));
		upfb.setPwd(request.getParameter("pwd"));
	
		s.putValue("UPFB", upfb);
		
		RequestDispatcher rd;
        rd = request.getRequestDispatcher("/vorschau.jsp");
        rd.forward(request, response);
	}
}
